package pyip.lib.javaweb;


/**
 * @author yepeng
 * @date 2014年12月11日
 */
public class Result1 {

    public static final int STATUS_SUCCESS = 1;
    public static final int STATUS_FAILURE = 0;

    // 0失败 1成功, 默认0
    private int status;
    private String msg;
    private Object data;

    public Result1() {
    }

    public void success(Object data) {
        this.data = data;
        this.status = STATUS_FAILURE;
    }

    public void failure(String msg) {
        this.msg = msg;
        this.status = STATUS_FAILURE;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
